<template>
  <page-view>
    <facet-demo :renderData="facetData" divId="ActorAppearMap"></facet-demo>
  </page-view>
</template>

<script>
	import FacetDemo from "@/components/FacetDemo";
	import PageView from '@/views/layout/PageView.vue';
	import axios from 'axios'
	export default {
		name: 'About',
		components: {
			PageView,
			FacetDemo
		},
		data() {
			return {
				facetData: []
			}
		},
		methods: {

		},
		created() {
			// axios.get('/api/facetData.json').then(res => {
			// 	console.log(res.data.data)
			// })

			let scenes = [], data = [];
			for (let i = 0; i < 100; i++) {
				scenes.push({
					"show": (Math.random()*10) >= 4 ? 0 : 1,
					"scene": i + 1 + '-' + i + 1
				})
			}
			for (let i = 0; i < 10; i++) {
				data.push({
					"name": "罗璧成" + (i+1),
					"scenes": scenes
				})
			}
			for (let i in data) {
        for(let j in data[i].scenes) {
          this.facetData.push({
            name: data[i].name,
            x: data[i].scenes[j].scene,
            y: data[i].scenes[j].show // parseInt(Math.random()*10)
          })
        }
      }
    }
	}

</script>>
